package util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	private static final SessionFactory sf;
	
	static{
		Configuration cfg=new Configuration().configure();
		sf=cfg.buildSessionFactory();
	}
	public static SessionFactory getSessionFactory(){
		return sf;
	}
	public static void shutDown(){
		getSessionFactory().close();
	}
}
